[FIX] Forum: Restore TinyMCE toolbar when editing posts with inline images#11612
Merged
mjansenDatabay merged 1 commit intoMay 28, 2026
Merged
Conversation
…mages Remove toolbar_sticky from the forum-specific TinyMCE profile and set image_advtab to false (aligned with tpl.tinymce.js). Sticky docking hid the toolbar on long thread edit pages after drag-and-drop images were saved as data URIs. https: //mantis.ilias.de/view.php?id=47755 Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
80f777b
into
ILIAS-eLearning:release_11
1 of 5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restore the forum TinyMCE toolbar when editing posts that contain drag-and-dropped inline images by disabling sticky toolbar docking and aligning
image_advtabwith the default editor profile.Problem
After creating a forum post with an image inserted via drag-and-drop (without manually resizing it), reopening the post for editing often shows no RTE toolbar buttons. The editor content loads, but formatting controls are missing.
Mantis: https://mantis.ilias.de/view.php?id=47755
Root Cause
The forum uses a dedicated TinyMCE template (
tpl.tinymce_frm_post.js) withtoolbar_sticky: true. On long thread/edit pages, sticky docking can fade out the editor header (tox-editor-dock-fadeout, hidden visibility/opacity) while inlinedata:images are present in the saved HTML. This makes the toolbar appear broken after save/re-edit.Solution
Remove
toolbar_stickyfrom the forum TinyMCE profile so the toolbar stays attached to the editor instance on edit screens. Setimage_advtab: falseto matchtpl.tinymce.js. This combination was verified locally (see internal evidence runadvtab_no_sticky).Alternatives considered: the full TinyMCE profile change from PR #11608 (
paste_data_images: false, etc.) — deferred here to keep the fix minimal and address the visible toolbar regression directly.Changes
components/ILIAS/RTE/templates/default/tpl.tinymce_frm_post.js: removetoolbar_sticky; setimage_advtab: falseVisual Evidence
Create Post (after drag & drop)
Before:
After:
Edit Existing Post
Before (toolbar missing):
After (toolbar visible):
Testing
Automated
bash ./scripts/PHPUnit/run_tests.sh./vendor/composer/vendor/phpunit/phpunit/phpunit -c ./components/ILIAS/Forum/phpunit.xml./vendor/composer/vendor/phpunit/phpunit/phpunit components/ILIAS/RTE/tests/ilTinyMCETest.php --bootstrap components/ILIAS/RTE/tests/bootstrap.phpManual
tpl.tinymce.js→ unchangedAssisted-by: Cursor AI